package com.wnxy.jdk8;

public class App5 {

    interface UseString{
        String use(String str,int start,int length);
    }

    public static String subAuthorName(String str, UseString useString){
        int start = 0;
        int length = 1;
        return useString.use(str,start,length);
    }
    public static void main(String[] args) {

        subAuthorName("Jerry", (str, start, length) -> str.substring(start,length));

        subAuthorName("Jerry", String::substring);

    }
}
